package com.backend.system.beans.user;

import cn.hutool.core.lang.tree.Tree;
import com.backend.system.util.TimeUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户信息vo
 *
 * @version v1.0
 * @author: backend-manage
 * @date: 2024年03月24日 09时50分
 */
@Data
@ApiModel
public class UserInfoVO implements Serializable {

    @Serial
    private static final long serialVersionUID = -312804720193129026L;

    /**
     * id
     */
    @ApiModelProperty(value = "登录用户的id", required = true)
    private Long id;

    /**
     * 登录账号
     */
    @ApiModelProperty(value = "登录账号", required = true)
    private String loginAccount;

    /**
     * 用户姓名
     */
    @ApiModelProperty(value = "用户姓名", required = true)
    private String username;

    /**
     * 当前角色ID
     */
    @ApiModelProperty(value = "当前角色ID", required = true)
    private Long currentRoleId;

    /**
     * 当前角色code
     */
    @ApiModelProperty(value = "当前角色code", required = true)
    private String currentRoleCode;

    /**
     * 当前角色名称
     */
    @ApiModelProperty(value = "当前角色名称", required = true)
    private String currentRoleName;

    /**
     * 树形菜单
     */
    @ApiModelProperty(value = "树形菜单", required = true)
    private List<Tree<String>> menuTree;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = TimeUtil.DEFAULT_DATE_TIME_PATTERN, timezone = TimeUtil.GMT_8)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
}
